package main

import (
	"io/ioutil"
	"fmt"
)

func main() {
	//readFile()
	//fmt.Println(eval(1,2,"+"))
	//eval(1,2,";")
	//fmt.Println(grede(59))
	//fmt.Println(grede(69))
	//fmt.Println(grede(80))
	//fmt.Println(grede(100))
	grede(101)
	//fmt.Println(grede(101))
}
func readFile() {
	const fileName = "abc.txt"
	//content, err := ioutil.ReadFile(fileName)
	//if err != nil {
	//	fmt.Println(err)
	//} else {
	//	fmt.Printf("%s \n", content)
	//
	//}
	if content, err := ioutil.ReadFile(fileName); err != nil {
		fmt.Println(err)
	} else {
		fmt.Printf("%s \n", content)
	}

}

func eval(a, b int, op string) int {
	var result int
	switch op {
	case "+":
		result = a + b
	case "-":
		result = a - b
	case "*":
		result = a / b

	case "/":
		result = a / b
	default:
		print("unsupport")
	}
	return result
}
func grede(score int) string {
	g := ""
	switch {
	case score < 0 || score > 100:
		panic(fmt.Sprintf("Wrong score: %d", score))
	case score < 60:
		g = "F"
	case score < 70:
		g = "C"
	case score < 90:
		g = "B"
	case score <= 100:
		g = "A"
	}
	return g
}
